﻿using System;
using System.Diagnostics.CodeAnalysis;
using System.Collections.Generic;
namespace Legend.Web.QueryString
{
    /// <summary>
    /// Handles the getting and setting of query string parameters
    /// to a query object.
    /// </summary>
    public interface IParameterAccessor
    {
        /// <summary>
        /// Apply the specified parameter value.
        /// </summary>
        /// <param name="parameterName">The name of the parameter to apply the value to.</param>
        /// <param name="value">The value to apply to the parameter.</param>
        void ApplyParameterValue(string parameterName, string value);

        /// <summary>
        /// Gets all the parameters for the query string and their values.
        /// </summary>
        /// <returns>A dictionary of parameters as keys and their associated values.</returns>
        [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
        IDictionary<string, string> GetAllParametersAndValues();
    }
}
